package com.haonan.pojo.dto;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;

/*
 *将前端查询的参数封装成一个类接受
 */
public class EmpQueryParamDTO implements Serializable {
    private Integer page =1;//页码，默认值为1
    private Integer pageSize =10;//每页显示的记录数，默认值为10
    private String name;//姓名
    private Integer gender;//性别
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate begin;//入职日期-开始
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate end;//入职日期-结束
    public EmpQueryParamDTO() {
    }

    public EmpQueryParamDTO(Integer page, Integer pageSize, String name, Integer gender, LocalDate begin, LocalDate end) {
        this.page = page;
        this.pageSize = pageSize;
        this.name = name;
        this.gender = gender;
        this.begin = begin;
        this.end = end;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public LocalDate getBegin() {
        return begin;
    }

    public void setBegin(LocalDate begin) {
        this.begin = begin;
    }

    public LocalDate getEnd() {
        return end;
    }

    public void setEnd(LocalDate end) {
        this.end = end;
    }
}
